export default function selectSort(arr: number[]): number[] {
  for (let i = 1; i < arr.length; i++) {
    while (i > 0 && arr[i-1] > arr[i]) {
      [arr[i-1], arr[i]] = [arr[i], arr[i-1]]
      i--;
    }
  }
  return arr;
}
